/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.hsos.samcomm.userManagement.boundary.jsf;


import de.hsos.samcomm.userManagement.controller.UserRepository;
import javax.enterprise.inject.Model;
import javax.inject.Inject;

/**
 *
 * @author rainer
 */
@Model
public class RegisterUIModel {
    @Inject
    UserRepository userRepository;
    String email;
    String password;

    public RegisterUIModel() {
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    
    public void registration(){
        if(this.email!=null &&this.password!=null)
            userRepository.addUser(this.email, this.password);
    }
    
    public String login() {
        return "Not implemented yet";
    }
}
